const request = require('./request');

module.exports = {
  gists: () => {
    const username = process.env.GRIDSOME_API_GITHUB_NAME;
    return request({
      method: 'GET',
      url: `https://api.github.com/users/${username}/gists?page=1&per_page=100`
    });
  },
  single: (id) => {
    return request({
      method: 'GET',
      url: '/gists/' + id
    });
  }
}